<?php


namespace app\compute\tree;


use app\controller\controller;
use app\controller\WebController;
use system\compute\trie\Trie;

class TrieController extends controller
{
    public function index()
    {
        $char = ['dasdasda','abcd','acbd','abcd'];
        $headTrie = new Trie();
        foreach ($char as $value) {
            $headTrie->findOrCreateNext($value);
        }
        return $headTrie->getDisplayNumber();
    }
}